/*******************************************************************************
 * Package: com.hngtrust.iir.company.controller.vo
 * Type:    RepVO
 * Date:    2020/11/24 14:36
 *
 * Copyright (c) 2020 HUANENG GUICHENG TRUST CORP.,LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.hngtrust.iir.company.controller.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 *查询列表的VO类
 * @author Chentianyong
 * @date 2021/3/22 14:36
 */
@ApiModel(description = "公司主营业务")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompMainbusinessRespVO {
   
    /**
     * 公司ID
     */
    @ApiModelProperty(value = "公司ID")
    private Long compId;
    
    /**
     * 主营业务信息列表
     */
    @ApiModelProperty(value = "主营业务信息列表")
    private List<MainBusiness> mainBusiness = new ArrayList<>();
    
    @Data
    @ApiModel(description = "主营业务")
    public static class MainBusiness {
        
        /**
         * 年份
         */
        @ApiModelProperty(value = "报告期", dataType = "Date")
        private Date reportPeriod;
        
        /**
         * 主营业务收入
         */
        @ApiModelProperty(value = "主营业务收入", dataType = "BigDecimal")
        private BigDecimal segmentSales;
    
        /**
         * 主营业务收入比例(%)
         */
        @ApiModelProperty(value = "主营业务收入比例(%)", dataType = "BigDecimal")
        private BigDecimal segmentSaleRatio;

        /**
         * 主营业务收入比上年增减(%)
         */
        @ApiModelProperty(value = "主营业务收入比上年增减(%)", dataType = "BigDecimal")
        private BigDecimal primeOperRevYoy;
    }
    
    /**
     * 年份
     */
    @ApiModelProperty(value = "报告期", dataType = "Date")
    private Date reportPeriod;
    
    /**
     * 营收种类信息列表
     */
    @ApiModelProperty(value = "营收种类信息列表")
    private List<BusinessType> businessType = new ArrayList<>();
    
    @Data
    @ApiModel(description = "营收种类")
    public static class BusinessType {
        /**
         * id
         */
        @ApiModelProperty(value = "id", dataType = "Long")
        private Long id;
        
        /**
         * 主营业务项目
         */
        @ApiModelProperty(value = "主营业务项目", dataType = "String")
        private String segmentItem;
    
        /**
         * 主营业务收入
         */
        @ApiModelProperty(value = "主营业务收入", dataType = "BigDecimal")
        private BigDecimal segmentSales;
    
        /**
         * 主营业务收入比例(%)
         */
        @ApiModelProperty(value = "主营业务收入比例(%)", dataType = "BigDecimal")
        private BigDecimal segmentSaleRatio;
    
        /**
         * 主营业务收入比上年增减(%)
         */
        @ApiModelProperty(value = "主营业务收入比上年增减(%)", dataType = "BigDecimal")
        private BigDecimal primeOperRevYoy;
    }
}
